package com.hqyj.base.service.impl;

import com.hqyj.base.mapper.InfoSupplierMapper;
import com.hqyj.base.model.InfoSupplier;
import com.hqyj.base.service.InfoSupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ProjectName: ERP-System
 * @Package: com.hqyj.base.service.impl
 * @ClassName: InfoSupplierServiceImpl
 * @Author: LiYi
 * @Date: 2021-09-06 22:36
 */

@Service
public class InfoSupplierServiceImpl implements InfoSupplierService {
    @Autowired
    private InfoSupplierMapper infoSupplierMapper;

    /*查询所有的InfoSupplier信息*/
    @Override
    public List<InfoSupplier> queryAllByInfoSupplier() {
        return infoSupplierMapper.queryAllByInfoSupplier();
    }

    @Override
    public int addSupplier(InfoSupplier infoSupplier) {
        return infoSupplierMapper.insertSelective(infoSupplier);
    }

    @Override
    public int deleteInfoSupplierById(int urlId) {
        return infoSupplierMapper.deleteByPrimaryKey(urlId);
    }

    @Override
    public InfoSupplier queryInfoSupplierById(int urlId) {
        return infoSupplierMapper.queryInfoSupplierById(urlId);
    }

    @Override
    public int updateInfoSupplierById(InfoSupplier infoSupplier) {
        return infoSupplierMapper.updateByPrimaryKeySelective(infoSupplier);
    }

    @Override
    public List<InfoSupplier> queryFuzzyInfoSupplier(String keyword) {
        return infoSupplierMapper.queryFuzzyInfoSupplier(keyword);
    }


}
